'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  router.get('/', controller.home.index);
  router.post('/registry',controller.user.registry);
  router.post('/login',controller.user.login);
  router.get('/getmenu',controller.user.getmenu)
  // //添加成绩
  // router.post('/add/scores',controller.scores.addscores);
  // //获取成绩
  // router.get('/list/scores',controller.scores.listscores);
  // //编辑成绩
  // router.post('/update/scores',controller.scores.updatescores);
  // //删除
  // router.get('/del/scores',controller.scores.delscores);

  router.resources('scores','/api/scores',controller.scores);
  //获取没有添加过的学生
  router.get('/getstudent',controller.user.getstudent);
  //获取首页图数据
  router.get('/getdate',controller.scores.getdate)
};
